<!--清算账户信息查询申请录入页面-->
<template>
  <div class="app-container">
    <ht-table
      ref="dataTable"
      :showSerialNumber="false"
      :multi-select="false"
      :dictMap="dictMap"
      :reqConfig="reqConfig"
      :queryParams="queryParams"
      :tableBindColumns="tableBindColumns"
      :opButtonList="opButtonList"
      :randomRowKey="true"
    >
      <template v-slot:operate>
        <el-table-column
          label="操作"
          align="center"
          width="120"
          fixed="right"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope">
            <ht-button-group
              :buttonList="[
            {
            label: '查询',
            // permission: 'user:xxx:xxx',
            doFunc: () => {
            handleAction('queryBtn', scope.row);
            }
            }
            ]"
            />
          </template>
        </el-table-column>
      </template>
    </ht-table>
    <!-- 查询操作弹出框 -->
    <enter-query ref="enterQueryDialog" :dictMap="dictMap" :formData.sync="formData"></enter-query>
  </div>
</template>
<script>
import { apiUrlConfig } from "@/api/cnaps/saps/clearAcctInfoQuery/clear_inquiry_entry.js";
import EnterQuery from "./components/enterQuery";
import { listPageMixin } from "@/libs/listPageMixin";
import { log } from "util";

export default {
  name: "clearInquiryEntry",
  mixins: [listPageMixin],
  components: {
    EnterQuery,
  },
  data() {
    return {
      reqConfig: apiUrlConfig,
      total: 0,
      dataList: [],
      //数据字典
      searchFormDictList: ["CLS_QUERYTYPE"],
      //  明细弹框数据
      // form表单字段
      formData: {
        rspId: "",
        drctBankCode: "",
        drctBankName: "",
        directSender: "",
        directSenderName: "",
        inqType: "",
        remarks: "",
      },
      // 查询参数
      queryParams: {},
      opButtonList: () => {
        return [];
      },
      tableBindColumns: [
        {
          label: `清算机构号`,
          prop: "drctBankCode",
          align: "center",
          sortable: false,
        },
        {
          label: `清算机构名称`,
          prop: "drctBankname",
          align: "center",
          sortable: false,
        },
      ],
    };
  },
  mounted() {},
  methods: {
    editComplete(state) {
      if (state == true) {
        this.$refs.dataTable.doQuery();
      }
    },
    handleAction(type, row = {}) {
      switch (type) {
        case "queryBtn":
          // 设置
          this.formData = _.clone(row);
          this.$set(this.formData, "drctBankCode", row.drctBankCode);
          this.$set(this.formData, "drctBankName", row.drctBankname);
          this.$set(this.formData, "directSender", row.drctBankCode);
          this.$set(this.formData, "directSenderName", row.drctBankname);
          this.$set(this.formData, "inqType", "QT00");

          this.$refs.enterQueryDialog.show();
          break;
      }
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}
</style>
